<?php


namespace app\impl;


use app\common\business\VisitPlanSend;
use app\common\lib\PushMessage;
use app\common\lib\ZhyxBeanstalkd;
use app\common\lib\ZhyxMongo;
use app\common\model\BaseModel;
use app\common\model\PatientInfo;
use app\interfaces\Task;
use catchAdmin\visitPlan\model\VisitPlan;
use catchAdmin\visitPlan\model\VisitPlanDetail;
use MongoDB\BSON\ObjectId;
use think\Log;

class SendVisitMessage implements Task
{

    public function run(array $data, string $taskId): ?bool
    {
        try {
            return (new VisitPlanSend())->sendVisitByVisitId($data["visit_id"]);

        } catch (\Exception $exception) {
            \think\facade\Log::error("复诊计划推送失败:" . $exception->getMessage());
        }
        return true;
    }
}